package com.example.designmodel.chain.dialog

import android.content.Context
import android.util.Log
import androidx.appcompat.app.AlertDialog

class ThirdDialog(val context: Context) :DialogIntercept{
    override fun intercept(dialogIntercept: DialogChain) {
            show(dialogIntercept)
    }

    override fun show(): Boolean {
        return true
    }

    private fun show(dialogIntercept: DialogChain){
        AlertDialog.Builder(context).setTitle("ThirdDialog").setPositiveButton("确定"
        ) { dialog, which ->
            dialogIntercept.proceed()
        }.setNegativeButton("取消"
        ) { dialog, which ->

        }.create().show()
    }
}